Implementing Campaign Manager - External Integrations


Using the Sentiment Score Plugin

The Sentiment score plugin is only available as a transformation step; it is not available as a Job plugin.

Procedure

  1. To start Spoon, navigate to your Kettle directory and run spoon.bat.
  2. Create a new Transformation (File > New > Transformation).
  3. In the Design tab, select the Alterian category, select the Sentiment score plugin and drag it to the transformation panel.
  4. In the Design tab, select a source of string data from the Input category. The examples shown below use a Data Grid step.
  5. Configure the Data Grid tool with one field of type String on the Meta tab. In the example, it is called "Message".
  6. Populate the Data tab with as many messages as required. The messages can be any length, but the sentiment score will be the sum of the keywords matched for each message.
    Note: You can replace the Data Grid with any other step that generates a string field, such as an input CSV step.
  7. Add a Text file output step from the Output category to view the score.
  8. Join the Data Grid to the Sentiment score step, and the Sentiment score step to the Text file output step.
  9. Open the Sentiment score step, and select the field to score that contains your message from the Field to score drop-down. The field is called "Message" in this example.
  10. Open the Text file output step and select the fields to output, and a location to write the file to.
  11. To generate more accurate results, select the Use Online Service check box.
    This is a free online service called "Textalytics Sentiment Analysis1.2". The service uses advanced natural language processing techniques to detect the polarity associated to both entities and concepts in the text.
  12. You can get the API key from textalytics.com. Note that the service is free up to 500,000 requests per month; you will be charged if you require more requests.

Results

Your initial transformation should look like this:

When you run the transformation, a text file containing the sentiment scores is written. This example transformation is available as example.ktr:


  Online & Instructor-Led Courses | Training Videos | Webinar Recordings
© Alterian. All Rights Reserved. | Privacy Policy | Legal Notice